import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/application/standardiztion/standard_scence_safe_third_inspect_entity.dart';

StandardScenceSafeThirdInspectEntity $StandardScenceSafeThirdInspectEntityFromJson(Map<String, dynamic> json) {
  final StandardScenceSafeThirdInspectEntity standardScenceSafeThirdInspectEntity = StandardScenceSafeThirdInspectEntity();
  final List<StandardScenceSafeThirdInspectAmendmentList>? amendmentList = (json['amendmentList'] as List<dynamic>?)?.map(
          (e) => jsonConvert.convert<StandardScenceSafeThirdInspectAmendmentList>(e) as StandardScenceSafeThirdInspectAmendmentList).toList();
  if (amendmentList != null) {
    standardScenceSafeThirdInspectEntity.amendmentList = amendmentList;
  }
  final String? companyCode = jsonConvert.convert<String>(json['companyCode']);
  if (companyCode != null) {
    standardScenceSafeThirdInspectEntity.companyCode = companyCode;
  }
  final String? createBy = jsonConvert.convert<String>(json['createBy']);
  if (createBy != null) {
    standardScenceSafeThirdInspectEntity.createBy = createBy;
  }
  final String? createById = jsonConvert.convert<String>(json['createById']);
  if (createById != null) {
    standardScenceSafeThirdInspectEntity.createById = createById;
  }
  final String? createDate = jsonConvert.convert<String>(json['createDate']);
  if (createDate != null) {
    standardScenceSafeThirdInspectEntity.createDate = createDate;
  }
  final String? deleted = jsonConvert.convert<String>(json['deleted']);
  if (deleted != null) {
    standardScenceSafeThirdInspectEntity.deleted = deleted;
  }
  final String? fileAddressUrl = jsonConvert.convert<String>(json['fileAddressUrl']);
  if (fileAddressUrl != null) {
    standardScenceSafeThirdInspectEntity.fileAddressUrl = fileAddressUrl;
  }
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    standardScenceSafeThirdInspectEntity.id = id;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    standardScenceSafeThirdInspectEntity.name = name;
  }
  final String? reviewContent = jsonConvert.convert<String>(json['reviewContent']);
  if (reviewContent != null) {
    standardScenceSafeThirdInspectEntity.reviewContent = reviewContent;
  }
  final int? reviewResult = jsonConvert.convert<int>(json['reviewResult']);
  if (reviewResult != null) {
    standardScenceSafeThirdInspectEntity.reviewResult = reviewResult;
  }
  final String? thirdPartName = jsonConvert.convert<String>(json['thirdPartName']);
  if (thirdPartName != null) {
    standardScenceSafeThirdInspectEntity.thirdPartName = thirdPartName;
  }
  final String? updateBy = jsonConvert.convert<String>(json['updateBy']);
  if (updateBy != null) {
    standardScenceSafeThirdInspectEntity.updateBy = updateBy;
  }
  final String? updateById = jsonConvert.convert<String>(json['updateById']);
  if (updateById != null) {
    standardScenceSafeThirdInspectEntity.updateById = updateById;
  }
  final String? updateDate = jsonConvert.convert<String>(json['updateDate']);
  if (updateDate != null) {
    standardScenceSafeThirdInspectEntity.updateDate = updateDate;
  }
  return standardScenceSafeThirdInspectEntity;
}

Map<String, dynamic> $StandardScenceSafeThirdInspectEntityToJson(StandardScenceSafeThirdInspectEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['amendmentList'] = entity.amendmentList?.map((v) => v.toJson()).toList();
  data['companyCode'] = entity.companyCode;
  data['createBy'] = entity.createBy;
  data['createById'] = entity.createById;
  data['createDate'] = entity.createDate;
  data['deleted'] = entity.deleted;
  data['fileAddressUrl'] = entity.fileAddressUrl;
  data['id'] = entity.id;
  data['name'] = entity.name;
  data['reviewContent'] = entity.reviewContent;
  data['reviewResult'] = entity.reviewResult;
  data['thirdPartName'] = entity.thirdPartName;
  data['updateBy'] = entity.updateBy;
  data['updateById'] = entity.updateById;
  data['updateDate'] = entity.updateDate;
  return data;
}

extension StandardScenceSafeThirdInspectEntityExtension on StandardScenceSafeThirdInspectEntity {
  StandardScenceSafeThirdInspectEntity copyWith({
    List<StandardScenceSafeThirdInspectAmendmentList>? amendmentList,
    String? companyCode,
    String? createBy,
    String? createById,
    String? createDate,
    String? deleted,
    String? fileAddressUrl,
    String? id,
    String? name,
    String? reviewContent,
    int? reviewResult,
    String? thirdPartName,
    String? updateBy,
    String? updateById,
    String? updateDate,
  }) {
    return StandardScenceSafeThirdInspectEntity()
      ..amendmentList = amendmentList ?? this.amendmentList
      ..companyCode = companyCode ?? this.companyCode
      ..createBy = createBy ?? this.createBy
      ..createById = createById ?? this.createById
      ..createDate = createDate ?? this.createDate
      ..deleted = deleted ?? this.deleted
      ..fileAddressUrl = fileAddressUrl ?? this.fileAddressUrl
      ..id = id ?? this.id
      ..name = name ?? this.name
      ..reviewContent = reviewContent ?? this.reviewContent
      ..reviewResult = reviewResult ?? this.reviewResult
      ..thirdPartName = thirdPartName ?? this.thirdPartName
      ..updateBy = updateBy ?? this.updateBy
      ..updateById = updateById ?? this.updateById
      ..updateDate = updateDate ?? this.updateDate;
  }
}

StandardScenceSafeThirdInspectAmendmentList $StandardScenceSafeThirdInspectAmendmentListFromJson(Map<String, dynamic> json) {
  final StandardScenceSafeThirdInspectAmendmentList standardScenceSafeThirdInspectAmendmentList = StandardScenceSafeThirdInspectAmendmentList();
  final String? amendmentDate = jsonConvert.convert<String>(json['amendmentDate']);
  if (amendmentDate != null) {
    standardScenceSafeThirdInspectAmendmentList.amendmentDate = amendmentDate;
  }
  final String? amendmentUser = jsonConvert.convert<String>(json['amendmentUser']);
  if (amendmentUser != null) {
    standardScenceSafeThirdInspectAmendmentList.amendmentUser = amendmentUser;
  }
  final String? companyCode = jsonConvert.convert<String>(json['companyCode']);
  if (companyCode != null) {
    standardScenceSafeThirdInspectAmendmentList.companyCode = companyCode;
  }
  final String? correlationId = jsonConvert.convert<String>(json['correlationId']);
  if (correlationId != null) {
    standardScenceSafeThirdInspectAmendmentList.correlationId = correlationId;
  }
  final String? createBy = jsonConvert.convert<String>(json['createBy']);
  if (createBy != null) {
    standardScenceSafeThirdInspectAmendmentList.createBy = createBy;
  }
  final String? createById = jsonConvert.convert<String>(json['createById']);
  if (createById != null) {
    standardScenceSafeThirdInspectAmendmentList.createById = createById;
  }
  final String? createDate = jsonConvert.convert<String>(json['createDate']);
  if (createDate != null) {
    standardScenceSafeThirdInspectAmendmentList.createDate = createDate;
  }
  final String? deleted = jsonConvert.convert<String>(json['deleted']);
  if (deleted != null) {
    standardScenceSafeThirdInspectAmendmentList.deleted = deleted;
  }
  final String? fileAddressUrl = jsonConvert.convert<String>(json['fileAddressUrl']);
  if (fileAddressUrl != null) {
    standardScenceSafeThirdInspectAmendmentList.fileAddressUrl = fileAddressUrl;
  }
  final String? id = jsonConvert.convert<String>(json['id']);
  if (id != null) {
    standardScenceSafeThirdInspectAmendmentList.id = id;
  }
  final String? sort = jsonConvert.convert<String>(json['sort']);
  if (sort != null) {
    standardScenceSafeThirdInspectAmendmentList.sort = sort;
  }
  final String? updateBy = jsonConvert.convert<String>(json['updateBy']);
  if (updateBy != null) {
    standardScenceSafeThirdInspectAmendmentList.updateBy = updateBy;
  }
  final String? updateById = jsonConvert.convert<String>(json['updateById']);
  if (updateById != null) {
    standardScenceSafeThirdInspectAmendmentList.updateById = updateById;
  }
  final String? updateDate = jsonConvert.convert<String>(json['updateDate']);
  if (updateDate != null) {
    standardScenceSafeThirdInspectAmendmentList.updateDate = updateDate;
  }
  return standardScenceSafeThirdInspectAmendmentList;
}

Map<String, dynamic> $StandardScenceSafeThirdInspectAmendmentListToJson(StandardScenceSafeThirdInspectAmendmentList entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['amendmentDate'] = entity.amendmentDate;
  data['amendmentUser'] = entity.amendmentUser;
  data['companyCode'] = entity.companyCode;
  data['correlationId'] = entity.correlationId;
  data['createBy'] = entity.createBy;
  data['createById'] = entity.createById;
  data['createDate'] = entity.createDate;
  data['deleted'] = entity.deleted;
  data['fileAddressUrl'] = entity.fileAddressUrl;
  data['id'] = entity.id;
  data['sort'] = entity.sort;
  data['updateBy'] = entity.updateBy;
  data['updateById'] = entity.updateById;
  data['updateDate'] = entity.updateDate;
  return data;
}

extension StandardScenceSafeThirdInspectAmendmentListExtension on StandardScenceSafeThirdInspectAmendmentList {
  StandardScenceSafeThirdInspectAmendmentList copyWith({
    String? amendmentDate,
    String? amendmentUser,
    String? companyCode,
    String? correlationId,
    String? createBy,
    String? createById,
    String? createDate,
    String? deleted,
    String? fileAddressUrl,
    String? id,
    String? sort,
    String? updateBy,
    String? updateById,
    String? updateDate,
  }) {
    return StandardScenceSafeThirdInspectAmendmentList()
      ..amendmentDate = amendmentDate ?? this.amendmentDate
      ..amendmentUser = amendmentUser ?? this.amendmentUser
      ..companyCode = companyCode ?? this.companyCode
      ..correlationId = correlationId ?? this.correlationId
      ..createBy = createBy ?? this.createBy
      ..createById = createById ?? this.createById
      ..createDate = createDate ?? this.createDate
      ..deleted = deleted ?? this.deleted
      ..fileAddressUrl = fileAddressUrl ?? this.fileAddressUrl
      ..id = id ?? this.id
      ..sort = sort ?? this.sort
      ..updateBy = updateBy ?? this.updateBy
      ..updateById = updateById ?? this.updateById
      ..updateDate = updateDate ?? this.updateDate;
  }
}
